<template>
  <div>
    <section class="top">
        <div class="container">
            <p class="pull-left">欢迎进入北京天易数聚科技有限公司 官网！我们将竭诚为您服务！
            </p>
            <p class="pull-right">
                热线电话：0514-11
            </p>

        </div>
    </section>
    <header class="header container">
        <span class="logo">
            <a href="/">
                <img src="logo.png" />
            </a>
        </span>
        <nav class="nav">
            <ul>
                <li><nuxt-link to="/">首页</nuxt-link></li>
                <li v-for="(v,i) in navList" :key="i">
                    <nuxt-link :to="{name:v.catdir,params:{newsId:v.catid}}">{{v.catname}}</nuxt-link>
                </li>
            </ul>
        </nav>
    </header>
    
  </div>
</template>
<script>
import { nav } from "../model";

export default {
  data() {
    return {
      navList: []
    };
  },
  mounted() {
    this.getNavList();
  },
  methods: {
    getNavList() {
      nav.getList().then(res => {
        this.navList = res;
      });
    }
  }
};
</script>